var base_leftbottom = +new Date(2016,4)//设置初始X轴(生成的x轴为 xxxx,a+1,b+1);
var oneDay_base_leftbottom = 24 * 3600 * 1000 * 30;
var date_xAxis = [];
var data1_leftBottom = [];
var data2_leftBottom = [];
    $.each(dataCounty_time.datatime,function(i,n){
        data1_leftBottom.push(parseInt(n.NumPeople)/1000)
    })
    $.each(dataCounty_time.datatime,function(i,n){
        data2_leftBottom.push(parseInt(n.Money)/1000000)
        
    })
    console.log(data2_leftBottom);

for (var i = 0; i < 25; i++) {
    var now = new Date(base_leftbottom += oneDay_base_leftbottom);
    date_xAxis.push([now.getFullYear(), now.getMonth()+1].join('/'));
}
//县金额，人数增幅情况(时间)
var myChart3 = echarts.init(document.getElementById('map3-a'));

var option3 = {
    tooltip: {
        trigger: 'axis',
        position: function (pt) {
            return [pt[0], '10%'];
        }
    },
    title: {
        text: functionTitle(dataCounty_time),
        textStyle: {
            color: '#1da1f2',
            fontSize: '12'
        }
    },
    legend: 
    {
        textStyle:{
            color:"#fff",
        },
        data:['人数','总金额'],
    },
    grid: {
        left: '2%',
        right: '2%',
        bottom: '20%',
        containLabel: true
    },
    xAxis: {
        axisLabel:{
            interval : 5, 
            textStyle: {
                color: '#fff'
            },
        },
        splitLine: {
            show: false
        },
        nameTextStyle:{
            color:"#fff"
        },
        type: 'category',
        data: date_xAxis
    },
    yAxis: [
        {
            splitLine: {
                show: false
            },
            type: 'value',
            name: '人数',
            nameTextStyle:{
                color:"#fff"
            },
            color:["#fff"],
            min: 0,
            interval: 25,
            axisLabel: {
                formatter: '{value} 千人',
                color: '#fff'
            }
        }
        ,
        {
            splitLine: {
                show: false
            },
            type: 'value',
            name: '总金额',
            nameTextStyle:{
                color:"#fff"
            },
            color:["#fff"],
            min: 0,
            interval: 10,
            axisLabel: {
                formatter: '{value} 百万',
                color:"#fff"
            }
        }
    ],
    dataZoom: [{
        type: 'inside',
        start: 0,
        end: 30
    }, {
        start: 0,
        end: 30,
        handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
        handleSize: '80%',
        handleStyle: {
            color: '#fff',
            shadowBlur: 3,
            shadowColor: 'rgba(0, 0, 0, 0.6)',
            shadowOffsetX: 2,
            shadowOffsetY: 2
        }
    }],
    series: [
        {
            name:'人数',
            type:'line',
            data:[]
        },
        {
            name:'总金额',
            type:'line',
            yAxisIndex: 1,
            data:[]
        }
    ]
};
function functionTitle(dataCounty_time){
    var titelName=dataCounty_time.title;
    return titelName;
}
myChart3.setOption(option3);